package com.juxing.service.liveCenter.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.juxing.service.liveCenter.bean.LiveBean;
import com.juxing.service.liveCenter.dao.ILiveDao;

@Repository
public class LiveDaoImpl extends AbstractBaseDao implements ILiveDao {

	@Override
	public long insert(LiveBean bean) {
		int cnt = this.insert("Live.insert", bean);
		if(cnt > 0) {
			return bean.getId();
		}
		return 0;
	}

	@Override
	public LiveBean queryById(long id) {
		return this.selectOne("Live.queryById", id);
	}
	
	@Override
	public List<LiveBean> queryLiveByActivityId(int activityId) {
		return this.selectList("Live.queryLiveByActivityId", activityId);
	}

}
